﻿
@{
    ViewBag.Title = "订单意向";
}


@*@model IEnumerable<MVC5Demo.Models.UserInfoViewModel>*@
@model System.Data.DataTable
@using System.Data
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <link href="~/Content/bootstrap.min.css" rel="stylesheet" />
    <title></title>
</head>
<body>
    <div>
        <hr />
        <h3>订单意向列表</h3>
        <div class="table-responsive">
            <table class="table table-striped table-bordered">
                <thead>
                    <tr>
                        <th>公司</th>
                        <th>建议编号</th>
                        <th>物料编码</th>
                        <th>物料名称</th>
                        <th>单位</th>
                        <th>价格</th>
                        <th>单据日期</th>
                        <th>需求日期</th>
                        <th>数量</th>
                        <th>采购员ID</th>
                        <th>备注</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (DataRow item in Model.Rows) { 
                    <tr>
                        <td>@Html.DisplayFor(p => item["Company"])</td>
                        <td>@Html.DisplayFor(p => item["SugNum"])</td>@*item.Sex == 0 ? "女" : "男"*@
                        <td>@Html.DisplayFor(p => item["PartNum"])</td>
                        <td>@Html.DisplayFor(p => item["LineDesc"])</td>
                         <td>@Html.DisplayFor(p => item["IUM"])</td>
                         <td>@Html.DisplayFor(p => item["UnitPrice"])</td>
                         <td>@if (item["OrderByDate"].ToString().Length>0)
	                        {
		                        @Html.DisplayFor(p => item["OrderByDate"],"DateTime")
	                        }else
	                        {
	                              
	                        }</td>
                         <td>@if (item["DueDate"].ToString().Length>0)
	                        {
		                        @Html.DisplayFor(p => item["DueDate"],"DateTime")
	                        }</td>
                         <td>@Html.DisplayFor(p => item["XRelQty"])</td>
                        <td>@Html.DisplayFor(p => item["BuyerID"])</td>
                         <td>@Html.DisplayFor(p => item["CommentText"])</td>
                        
                        @*<td>@Html.ActionLink("编辑", "Edit", "UserInfo", new { id=item.UserID.ToString() },null) @Html.ActionLink("删除", "Delete", "UserInfo", new { id = item.UserID.ToString() }, new { onclick="return confirm('确认删除"+item.UserName+"的记录？');" })</td>*@
                        <td>@Html.ActionLink("编辑", "Edit", "Home", new { id=item["SugNum"] },null)</td>
                    </tr>
                    }
                </tbody>
            </table>
        </div>

    </div>
</body>
</html>